﻿//********************************************************************************//
//创建日期：<创建日期，2010-08-02>
//创建作者：<王一飞，wangyifei@shanghai3h.com>
//功能说明：QS_YH_SHENJINGXXB实体层次
//********************************************************************************//
#region Entity
namespace Entity{
	using System;
	using System.Xml;
	[Serializable()]
	public class QS_YH_SHENJINGXXB{

		private decimal m_dec_id;
		/// <summary>
		/// 自增量
		/// </summary>
		public decimal ID{get{return m_dec_id;}set{m_dec_id=value;}}

		private string m_str_s_xingzhengqbh;
		/// <summary>
		/// 行政区编号

		/// </summary>
		public string S_XINGZHENGQBH{get{return m_str_s_xingzhengqbh;}set{m_str_s_xingzhengqbh=value;}}

		private string m_str_s_liuyubh;
		/// <summary>
		/// 流域编号
		/// </summary>
		public string S_LIUYUBH{get{return m_str_s_liuyubh;}set{m_str_s_liuyubh=value;}}

		private string m_str_s_shuiziybh;
		/// <summary>
		/// 水资源编号

		/// </summary>
		public string S_SHUIZIYBH{get{return m_str_s_shuiziybh;}set{m_str_s_shuiziybh=value;}}

		private string m_str_s_fengpianbh;
		/// <summary>
		/// 水利分片编号

		/// </summary>
		public string S_FENGPIANBH{get{return m_str_s_fengpianbh;}set{m_str_s_fengpianbh=value;}}

		private string m_str_s_huangxianbh;
		/// <summary>
		/// 环线编号

		/// </summary>
		public string S_HUANGXIANBH{get{return m_str_s_huangxianbh;}set{m_str_s_huangxianbh=value;}}

		private string m_str_s_jingleixbh;
		/// <summary>
		/// 井类型编号
        ///(1--常用井,2--采灌井,3--专灌井,4--矿泉井)
		/// </summary>
		public string S_JINGLEIXBH{get{return m_str_s_jingleixbh;}set{m_str_s_jingleixbh=value;}}

		private string m_str_s_jingzhuangtbh;
		/// <summary>
		/// 井状态编号
        ///(001空状态,002备用井,004更新井,008注销井恢复使用 003更新报废井,005报废井 006填没井,007注销许可证)
		/// </summary>
		public string S_JINGZHUANGTBH{get{return m_str_s_jingzhuangtbh;}set{m_str_s_jingzhuangtbh=value;}}

		private string m_str_s_jingbiaosbh;
		/// <summary>
		/// 井标识编号

		/// </summary>
		public string S_JINGBIAOSBH{get{return m_str_s_jingbiaosbh;}set{m_str_s_jingbiaosbh=value;}}

		private string m_str_s_xukezhengbh;
		/// <summary>
		/// 许可证编号

		/// </summary>
		public string S_XUKEZHENGBH{get{return m_str_s_xukezhengbh;}set{m_str_s_xukezhengbh=value;}}

		private string m_str_s_jingbh;
		/// <summary>
		/// 井编号

		/// </summary>
		public string S_JINGBH{get{return m_str_s_jingbh;}set{m_str_s_jingbh=value;}}

		private string m_str_s_jingdiz;
		/// <summary>
		/// 井地址

		/// </summary>
		public string S_JINGDIZ{get{return m_str_s_jingdiz;}set{m_str_s_jingdiz=value;}}

		private decimal? m_dec_i_ceng;
		/// <summary>
		/// 层
		/// </summary>
		public decimal? I_CENG{get{return m_dec_i_ceng;}set{m_dec_i_ceng=value;}}

		private string m_str_s_shengdu;
		/// <summary>
		/// 深度

		/// </summary>
		public string S_SHENGDU{get{return m_str_s_shengdu;}set{m_str_s_shengdu=value;}}

		private decimal? m_dec_i_kongjing;
		/// <summary>
		/// 口径

		/// </summary>
		public decimal? I_KONGJING{get{return m_dec_i_kongjing;}set{m_dec_i_kongjing=value;}}

		private string m_str_s_zhuobiao;
		/// <summary>
		/// 坐标

		/// </summary>
		public string S_ZHUOBIAO{get{return m_str_s_zhuobiao;}set{m_str_s_zhuobiao=value;}}

		private DateTime? m_DT_d_xiugaiztrq;
		/// <summary>
		/// 修改状态时间

		/// </summary>
		public DateTime? D_XIUGAIZTRQ{get{return m_DT_d_xiugaiztrq;}set{m_DT_d_xiugaiztrq=value;}}

		private string m_str_s_xiugaiwjbhzt;
		/// <summary>
		/// 修改文件编号状态

		/// </summary>
		public string S_XIUGAIWJBHZT{get{return m_str_s_xiugaiwjbhzt;}set{m_str_s_xiugaiwjbhzt=value;}}

		private string m_str_s_beizhu;
		/// <summary>
		/// 备注说明

		/// </summary>
		public string S_BEIZHU{get{return m_str_s_beizhu;}set{m_str_s_beizhu=value;}}

		private DateTime? m_DT_d_jingrq;
		/// <summary>
		/// 井日期
		/// </summary>
		public DateTime? D_JINGRQ{get{return m_DT_d_jingrq;}set{m_DT_d_jingrq=value;}}

		private string m_str_s_gengxinjbh;
		/// <summary>
		/// 更新井编号

		/// </summary>
		public string S_GENGXINJBH{get{return m_str_s_gengxinjbh;}set{m_str_s_gengxinjbh=value;}}

		private decimal? m_dec_i_jlzt;
		/// <summary>
		/// 记录状态
		/// </summary>
		public decimal? I_JLZT{get{return m_dec_i_jlzt;}set{m_dec_i_jlzt=value;}}

		private string m_str_s_tianjiar;
		/// <summary>
		/// 添加人编号

		/// </summary>
		public string S_TIANJIAR{get{return m_str_s_tianjiar;}set{m_str_s_tianjiar=value;}}

		private DateTime? m_DT_d_tianjiarq;
		/// <summary>
		/// 添加日期

		/// </summary>
		public DateTime? D_TIANJIARQ{get{return m_DT_d_tianjiarq;}set{m_DT_d_tianjiarq=value;}}

		private string m_str_s_caozuor;
		/// <summary>
		/// 操作人编号

		/// </summary>
		public string S_CAOZUOR{get{return m_str_s_caozuor;}set{m_str_s_caozuor=value;}}

		private DateTime? m_DT_d_caozuorq;
		/// <summary>
		/// 操作日期

		/// </summary>
		public DateTime? D_CAOZUORQ{get{return m_DT_d_caozuorq;}set{m_DT_d_caozuorq=value;}}

		private string m_str_s_kaishiny;
		/// <summary>
		/// 开始年月

		/// </summary>
		public string S_KAISHINY{get{return m_str_s_kaishiny;}set{m_str_s_kaishiny=value;}}

		private string m_str_s_jieshuny;
		/// <summary>
		/// 结束年月
		/// </summary>
		public string S_JIESHUNY{get{return m_str_s_jieshuny;}set{m_str_s_jieshuny=value;}}

		private string m_str_s_laobianh;
		/// <summary>
		/// 老井编号

		/// </summary>
		public string S_LAOBIANH{get{return m_str_s_laobianh;}set{m_str_s_laobianh=value;}}

		private string m_str_s_laobianh2;
		/// <summary>
		/// 老井编号2

		/// </summary>
		public string S_LAOBIANH2{get{return m_str_s_laobianh2;}set{m_str_s_laobianh2=value;}}

		private decimal? m_dec_i_bll;
		/// <summary>
		/// 泵流量
		/// </summary>
		public decimal? I_BLL{get{return m_dec_i_bll;}set{m_dec_i_bll=value;}}

		private decimal? m_dec_i_yc;
		/// <summary>
		/// 扬程
		/// </summary>
		public decimal? I_YC{get{return m_dec_i_yc;}set{m_dec_i_yc=value;}}

		private string m_str_s_xukeslh;
		/// <summary>
		/// 许可受理号
		/// </summary>
		public string S_XUKESLH{get{return m_str_s_xukeslh;}set{m_str_s_xukeslh=value;}}

		private DateTime? m_DT_d_xukeqssj;
		/// <summary>
		/// 许可开始日期
		/// </summary>
		public DateTime? D_XUKEQSSJ{get{return m_DT_d_xukeqssj;}set{m_DT_d_xukeqssj=value;}}

		private DateTime? m_DT_d_xukejssj;
		/// <summary>
		/// 许可结束日期
		/// </summary>
		public DateTime? D_XUKEJSSJ{get{return m_DT_d_xukejssj;}set{m_DT_d_xukejssj=value;}}
		public QS_YH_SHENJINGXXB()
		{
		}
}}
#endregion
#region EntityProcess
namespace BLL.Access
{
	using System;
	using System.Data;
	//using System.Data.OracleClient;
	using Entity;
	using System.Configuration;
	using System.Data.Common;
	using Platform.Data;
	using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    using Oracle.DataAccess;
	public class QS_YH_SHENJINGXXBProcess{
    	#region Field
		protected string conn;
		#endregion
		#region Construction
        public QS_YH_SHENJINGXXBProcess(){conn = Platform.Configuration.ConfigHelper.PlatformConnString;}
		#endregion
		#region public
		
		/// <summary>
        /// 根据QS_YH_SHENJINGXXB实体添加或者修改QS_YH_SHENJINGXXB信息
        /// </summary>
		public bool InsertOrUpdate(QS_YH_SHENJINGXXB QS_YH_SHENJINGXXB,OracleTransaction Transaction){
			if (QS_YH_SHENJINGXXB.ID == 0)
            {
                InsertQS_YH_SHENJINGXXB(QS_YH_SHENJINGXXB, Transaction);
            }
            else
            {
                UpdateQS_YH_SHENJINGXXB(QS_YH_SHENJINGXXB, Transaction);
            }
            return QS_YH_SHENJINGXXB.ID == 0 ? false : true;
        }
		
		/// <summary>
        /// 根据QS_YH_SHENJINGXXB实体添加或修改QS_YH_SHENJINGXXB信息
        /// </summary>
		public bool InsertOrUpdate(QS_YH_SHENJINGXXB QS_YH_SHENJINGXXB){
			return InsertOrUpdate(QS_YH_SHENJINGXXB,null);
        }
	
		
		
		/// <summary>
        /// 根据QS_YH_SHENJINGXXB主键删除QS_YH_SHENJINGXXB信息
        /// </summary>
		/// <param name="ID"></param>
		public bool DeleteQS_YH_SHENJINGXXB(decimal ID,OracleTransaction Transaction)
        {
            string spName = "CS_DelQS_YH_SHENJINGXXB";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
			storedParams[0].Value = ID;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result==0?false:true;
        }
		
		/// <summary>
        /// 根据QS_YH_SHENJINGXXB主键删除QS_YH_SHENJINGXXB信息
        /// </summary>
		/// <param name="ID"></param>
		public bool DeleteQS_YH_SHENJINGXXB(decimal ID)
        {
           	return DeleteQS_YH_SHENJINGXXB(ID,null);
        }
		
		/// <summary>
        /// 根据条件删除QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
		public bool DeleteQS_YH_SHENJINGXXBsDynamic(string WhereClause, OracleTransaction Transaction)
        {
            string spName = "CS_DelQS_YH_SHENJINGXXBsDyn";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = WhereClause;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }
		
		/// <summary>
        /// 根据条件删除QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
		public bool DeleteQS_YH_SHENJINGXXBsDynamic(string WhereClause)
        {
           return DeleteQS_YH_SHENJINGXXBsDynamic(WhereClause,null);
        }
		
		/// <summary>
        /// 根据QS_YH_SHENJINGXXB主键选择QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>QS_YH_SHENJINGXXB信息</returns>
		public QS_YH_SHENJINGXXB SelectQS_YH_SHENJINGXXB(decimal ID,OracleTransaction Transaction)
        {
            string spName = "CS_SelQS_YH_SHENJINGXXB";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
			storedParams[0].Value = ID;
            OracleDataReader rd;
            if (Transaction == null)
                rd = OracleHelper.ExecuteReader(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                rd = OracleHelper.ExecuteReader((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (rd.Read())
            {
                QS_YH_SHENJINGXXB QS_YH_SHENJINGXXB = PopulateQS_YH_SHENJINGXXB(rd);
                rd.Close();
				return QS_YH_SHENJINGXXB;
            }
            else
                return null;
        }
		
		/// <summary>
        /// 根据QS_YH_SHENJINGXXB主键选择QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <returns>QS_YH_SHENJINGXXB信息</returns>
		public QS_YH_SHENJINGXXB SelectQS_YH_SHENJINGXXB(decimal ID)
        {
			return SelectQS_YH_SHENJINGXXB(ID,null);       
        }
		
		/// <summary>
        /// 选择所有QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>所有QS_YH_SHENJINGXXB信息</returns>
		public DataTable SelectQS_YH_SHENJINGXXBsAll(OracleTransaction Transaction)
        {
            string spName = "CS_SelQS_YH_SHENJINGXXBsAll";
			OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            DataSet ds=null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName,storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName,storedParams);
			if(ds!=null&&ds.Tables.Count>0){
				AddRowNumber(ds.Tables[0]);
				return ds.Tables[0];
			}
			else
				return null;
        }
		
		/// <summary>
        /// 选择所有QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <returns>所有QS_YH_SHENJINGXXB信息</returns>
		public DataTable SelectQS_YH_SHENJINGXXBsAll()
        {
            return SelectQS_YH_SHENJINGXXBsAll(null);
        }
		
		/// <summary>
        /// 根据条件选择QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>QS_YH_SHENJINGXXB信息</returns>
		public DataTable SelectQS_YH_SHENJINGXXBsDynamic(string WhereClause, string OrderByExpression, OracleTransaction Transaction)
        {
            string spName = "CS_SelQS_YH_SHENJINGXXBsDyn";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value =string.IsNullOrEmpty(WhereClause.Trim())?"1=1":WhereClause;
            storedParams[1].Value = OrderByExpression;
            DataSet ds=null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName,storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName,storedParams);
			if(ds!=null&&ds.Tables.Count>0){
				AddRowNumber(ds.Tables[0]);
				return ds.Tables[0];
			}
			else
				return null;
        }		
		
		
		/// <summary>
        /// 根据条件选择QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <returns>QS_YH_SHENJINGXXB信息</returns>
		public DataTable SelectQS_YH_SHENJINGXXBsDynamic(string WhereClause, string OrderByExpression)
        {
            return SelectQS_YH_SHENJINGXXBsDynamic(WhereClause, OrderByExpression,null);
        }		
		
		
		
		/// <summary>
        /// 根据条件选择QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
		/// <param name="PageIndex">页码</param>
		/// <param name="PageSize">页数</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>QS_YH_SHENJINGXXB信息</returns>
		public DataTable SelectQS_YH_SHENJINGXXBsDynamic(string WhereClause, string OrderByExpression, int PageIndex,int PageSize,OracleTransaction Transaction)
        {
            string spName = "CS_SelQS_YH_SHENJINGXXBsDynPaged";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value =string.IsNullOrEmpty(WhereClause.Trim())?"1=1":WhereClause;
            storedParams[1].Value = OrderByExpression;
			storedParams[2].Value = PageIndex;
			storedParams[3].Value = PageSize;
            DataSet ds=null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName,storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName,storedParams);
			if(ds!=null&&ds.Tables.Count>0){
				AddRowNumber(ds.Tables[0]);
				return ds.Tables[0];
			}
			else
				return null;
        }		
		
		
		/// <summary>
        /// 根据条件选择QS_YH_SHENJINGXXB信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
		/// <param name="PageIndex">页码</param>
		/// <param name="PageSize">页数</param>
        /// <returns>QS_YH_SHENJINGXXB信息</returns>
		public DataTable SelectQS_YH_SHENJINGXXBsDynamic(string WhereClause, string OrderByExpression, int PageIndex,int PageSize)
        {
            return SelectQS_YH_SHENJINGXXBsDynamic(WhereClause, OrderByExpression,PageIndex,PageSize,null);
        }		
		
		/// <summary>
		///根据条件更新QS_YH_SHENJINGXXB字段
		/// </summary>
		/// <returns>受影响行数</returns>
		public int UpdateQS_YH_SHENJINGXXBsDynamic(string UpdateValue,string WhereClause,OracleTransaction Transaction)
		{
			int result = 0;
			if(UpdateValue == "" || WhereClause == "")
			{
				return 0;	
			}
			string spName = "CS_UpdQS_YH_SHENJINGXXBDyn";
			OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
			DataSet ds=null;
			storedParams[0].Value = UpdateValue;
            storedParams[1].Value = WhereClause;
			if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName,storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName,storedParams);
			result = Convert.ToInt32(storedParams[2].Value);
			return result;
		}
		
		/// <summary>
		///根据条件更新QS_YH_SHENJINGXXB字段
		/// </summary>
		/// <returns>受影响行数</returns>
		public int UpdateQS_YH_SHENJINGXXBsDynamic(string UpdateValue,string WhereClause)
		{
			return UpdateQS_YH_SHENJINGXXBsDynamic(UpdateValue,WhereClause,null);
		}
		
		
		#endregion
		#region Private
		
		private int InsertQS_YH_SHENJINGXXB(QS_YH_SHENJINGXXB QS_YH_SHENJINGXXB,OracleTransaction Transaction)
		{
            string spName = "CS_InsQS_YH_SHENJINGXXB";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
			storedParams[0].Value = QS_YH_SHENJINGXXB.S_XINGZHENGQBH;
			storedParams[1].Value = QS_YH_SHENJINGXXB.S_LIUYUBH;
			storedParams[2].Value = QS_YH_SHENJINGXXB.S_SHUIZIYBH;
			storedParams[3].Value = QS_YH_SHENJINGXXB.S_FENGPIANBH;
			storedParams[4].Value = QS_YH_SHENJINGXXB.S_HUANGXIANBH;
			storedParams[5].Value = QS_YH_SHENJINGXXB.S_JINGLEIXBH;
			storedParams[6].Value = QS_YH_SHENJINGXXB.S_JINGZHUANGTBH;
			storedParams[7].Value = QS_YH_SHENJINGXXB.S_JINGBIAOSBH;
			storedParams[8].Value = QS_YH_SHENJINGXXB.S_XUKEZHENGBH;
			storedParams[9].Value = QS_YH_SHENJINGXXB.S_JINGBH;
			storedParams[10].Value = QS_YH_SHENJINGXXB.S_JINGDIZ;
			storedParams[11].Value = QS_YH_SHENJINGXXB.I_CENG;
			storedParams[12].Value = QS_YH_SHENJINGXXB.S_SHENGDU;
			storedParams[13].Value = QS_YH_SHENJINGXXB.I_KONGJING;
			storedParams[14].Value = QS_YH_SHENJINGXXB.S_ZHUOBIAO;
			storedParams[15].Value = QS_YH_SHENJINGXXB.D_XIUGAIZTRQ;
			storedParams[16].Value = QS_YH_SHENJINGXXB.S_XIUGAIWJBHZT;
			storedParams[17].Value = QS_YH_SHENJINGXXB.S_BEIZHU;
			storedParams[18].Value = QS_YH_SHENJINGXXB.D_JINGRQ;
			storedParams[19].Value = QS_YH_SHENJINGXXB.S_GENGXINJBH;
			storedParams[20].Value = QS_YH_SHENJINGXXB.I_JLZT;
			storedParams[21].Value = QS_YH_SHENJINGXXB.S_TIANJIAR;
			storedParams[22].Value = QS_YH_SHENJINGXXB.D_TIANJIARQ;
			storedParams[23].Value = QS_YH_SHENJINGXXB.S_CAOZUOR;
			storedParams[24].Value = QS_YH_SHENJINGXXB.D_CAOZUORQ;
			storedParams[25].Value = QS_YH_SHENJINGXXB.S_KAISHINY;
			storedParams[26].Value = QS_YH_SHENJINGXXB.S_JIESHUNY;
			storedParams[27].Value = QS_YH_SHENJINGXXB.S_LAOBIANH;
			storedParams[28].Value = QS_YH_SHENJINGXXB.S_LAOBIANH2;
			storedParams[29].Value = QS_YH_SHENJINGXXB.I_BLL;
			storedParams[30].Value = QS_YH_SHENJINGXXB.I_YC;
			storedParams[31].Value = QS_YH_SHENJINGXXB.S_XUKESLH;
			storedParams[32].Value = QS_YH_SHENJINGXXB.D_XUKEQSSJ;
			storedParams[33].Value = QS_YH_SHENJINGXXB.D_XUKEJSSJ;
            int result=0;
            if (Transaction == null)
                result=OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result=OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
			QS_YH_SHENJINGXXB.ID=Convert.ToInt32(storedParams[34].Value);
            return result;
        }
		private bool UpdateQS_YH_SHENJINGXXB(QS_YH_SHENJINGXXB QS_YH_SHENJINGXXB,OracleTransaction Transaction)
        {
            string spName = "CS_UpdQS_YH_SHENJINGXXB";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
			storedParams[0].Value = QS_YH_SHENJINGXXB.S_XINGZHENGQBH;
			storedParams[1].Value = QS_YH_SHENJINGXXB.S_LIUYUBH;
			storedParams[2].Value = QS_YH_SHENJINGXXB.S_SHUIZIYBH;
			storedParams[3].Value = QS_YH_SHENJINGXXB.S_FENGPIANBH;
			storedParams[4].Value = QS_YH_SHENJINGXXB.S_HUANGXIANBH;
			storedParams[5].Value = QS_YH_SHENJINGXXB.S_JINGLEIXBH;
			storedParams[6].Value = QS_YH_SHENJINGXXB.S_JINGZHUANGTBH;
			storedParams[7].Value = QS_YH_SHENJINGXXB.S_JINGBIAOSBH;
			storedParams[8].Value = QS_YH_SHENJINGXXB.S_XUKEZHENGBH;
			storedParams[9].Value = QS_YH_SHENJINGXXB.S_JINGBH;
			storedParams[10].Value = QS_YH_SHENJINGXXB.S_JINGDIZ;
			storedParams[11].Value = QS_YH_SHENJINGXXB.I_CENG;
			storedParams[12].Value = QS_YH_SHENJINGXXB.S_SHENGDU;
			storedParams[13].Value = QS_YH_SHENJINGXXB.I_KONGJING;
			storedParams[14].Value = QS_YH_SHENJINGXXB.S_ZHUOBIAO;
			storedParams[15].Value = QS_YH_SHENJINGXXB.D_XIUGAIZTRQ;
			storedParams[16].Value = QS_YH_SHENJINGXXB.S_XIUGAIWJBHZT;
			storedParams[17].Value = QS_YH_SHENJINGXXB.S_BEIZHU;
			storedParams[18].Value = QS_YH_SHENJINGXXB.D_JINGRQ;
			storedParams[19].Value = QS_YH_SHENJINGXXB.S_GENGXINJBH;
			storedParams[20].Value = QS_YH_SHENJINGXXB.I_JLZT;
			storedParams[21].Value = QS_YH_SHENJINGXXB.S_TIANJIAR;
			storedParams[22].Value = QS_YH_SHENJINGXXB.D_TIANJIARQ;
			storedParams[23].Value = QS_YH_SHENJINGXXB.S_CAOZUOR;
			storedParams[24].Value = QS_YH_SHENJINGXXB.D_CAOZUORQ;
			storedParams[25].Value = QS_YH_SHENJINGXXB.S_KAISHINY;
			storedParams[26].Value = QS_YH_SHENJINGXXB.S_JIESHUNY;
			storedParams[27].Value = QS_YH_SHENJINGXXB.S_LAOBIANH;
			storedParams[28].Value = QS_YH_SHENJINGXXB.S_LAOBIANH2;
			storedParams[29].Value = QS_YH_SHENJINGXXB.I_BLL;
			storedParams[30].Value = QS_YH_SHENJINGXXB.I_YC;
			storedParams[31].Value = QS_YH_SHENJINGXXB.S_XUKESLH;
			storedParams[32].Value = QS_YH_SHENJINGXXB.D_XUKEQSSJ;
			storedParams[33].Value = QS_YH_SHENJINGXXB.D_XUKEJSSJ;
			storedParams[34].Value = QS_YH_SHENJINGXXB.ID;
			int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;            
        }
		
		
		private QS_YH_SHENJINGXXB PopulateQS_YH_SHENJINGXXB(IDataReader dr)
        {
			QS_YH_SHENJINGXXB QS_YH_SHENJINGXXB=new QS_YH_SHENJINGXXB();
			QS_YH_SHENJINGXXB.ID=dr["ID"] == DBNull.Value ? (decimal)0 : (decimal)dr["ID"];
			QS_YH_SHENJINGXXB.S_XINGZHENGQBH=dr["S_XINGZHENGQBH"] == DBNull.Value ? null : (string)dr["S_XINGZHENGQBH"];
			QS_YH_SHENJINGXXB.S_LIUYUBH=dr["S_LIUYUBH"] == DBNull.Value ? null : (string)dr["S_LIUYUBH"];
			QS_YH_SHENJINGXXB.S_SHUIZIYBH=dr["S_SHUIZIYBH"] == DBNull.Value ? null : (string)dr["S_SHUIZIYBH"];
			QS_YH_SHENJINGXXB.S_FENGPIANBH=dr["S_FENGPIANBH"] == DBNull.Value ? null : (string)dr["S_FENGPIANBH"];
			QS_YH_SHENJINGXXB.S_HUANGXIANBH=dr["S_HUANGXIANBH"] == DBNull.Value ? null : (string)dr["S_HUANGXIANBH"];
			QS_YH_SHENJINGXXB.S_JINGLEIXBH=dr["S_JINGLEIXBH"] == DBNull.Value ? null : (string)dr["S_JINGLEIXBH"];
			QS_YH_SHENJINGXXB.S_JINGZHUANGTBH=dr["S_JINGZHUANGTBH"] == DBNull.Value ? null : (string)dr["S_JINGZHUANGTBH"];
			QS_YH_SHENJINGXXB.S_JINGBIAOSBH=dr["S_JINGBIAOSBH"] == DBNull.Value ? null : (string)dr["S_JINGBIAOSBH"];
			QS_YH_SHENJINGXXB.S_XUKEZHENGBH=dr["S_XUKEZHENGBH"] == DBNull.Value ? null : (string)dr["S_XUKEZHENGBH"];
			QS_YH_SHENJINGXXB.S_JINGBH=dr["S_JINGBH"] == DBNull.Value ? null : (string)dr["S_JINGBH"];
			QS_YH_SHENJINGXXB.S_JINGDIZ=dr["S_JINGDIZ"] == DBNull.Value ? null : (string)dr["S_JINGDIZ"];
			QS_YH_SHENJINGXXB.I_CENG=dr["I_CENG"] == DBNull.Value ? null : (decimal?)dr["I_CENG"];
			QS_YH_SHENJINGXXB.S_SHENGDU=dr["S_SHENGDU"] == DBNull.Value ? null : (string)dr["S_SHENGDU"];
			QS_YH_SHENJINGXXB.I_KONGJING=dr["I_KONGJING"] == DBNull.Value ? null : (decimal?)dr["I_KONGJING"];
			QS_YH_SHENJINGXXB.S_ZHUOBIAO=dr["S_ZHUOBIAO"] == DBNull.Value ? null : (string)dr["S_ZHUOBIAO"];
			QS_YH_SHENJINGXXB.D_XIUGAIZTRQ=dr["D_XIUGAIZTRQ"] == DBNull.Value ? null : (DateTime?)dr["D_XIUGAIZTRQ"];
			QS_YH_SHENJINGXXB.S_XIUGAIWJBHZT=dr["S_XIUGAIWJBHZT"] == DBNull.Value ? null : (string)dr["S_XIUGAIWJBHZT"];
			QS_YH_SHENJINGXXB.S_BEIZHU=dr["S_BEIZHU"] == DBNull.Value ? null : (string)dr["S_BEIZHU"];
			QS_YH_SHENJINGXXB.D_JINGRQ=dr["D_JINGRQ"] == DBNull.Value ? null : (DateTime?)dr["D_JINGRQ"];
			QS_YH_SHENJINGXXB.S_GENGXINJBH=dr["S_GENGXINJBH"] == DBNull.Value ? null : (string)dr["S_GENGXINJBH"];
			QS_YH_SHENJINGXXB.I_JLZT=dr["I_JLZT"] == DBNull.Value ? null : (decimal?)dr["I_JLZT"];
			QS_YH_SHENJINGXXB.S_TIANJIAR=dr["S_TIANJIAR"] == DBNull.Value ? null : (string)dr["S_TIANJIAR"];
			QS_YH_SHENJINGXXB.D_TIANJIARQ=dr["D_TIANJIARQ"] == DBNull.Value ? null : (DateTime?)dr["D_TIANJIARQ"];
			QS_YH_SHENJINGXXB.S_CAOZUOR=dr["S_CAOZUOR"] == DBNull.Value ? null : (string)dr["S_CAOZUOR"];
			QS_YH_SHENJINGXXB.D_CAOZUORQ=dr["D_CAOZUORQ"] == DBNull.Value ? null : (DateTime?)dr["D_CAOZUORQ"];
			QS_YH_SHENJINGXXB.S_KAISHINY=dr["S_KAISHINY"] == DBNull.Value ? null : (string)dr["S_KAISHINY"];
			QS_YH_SHENJINGXXB.S_JIESHUNY=dr["S_JIESHUNY"] == DBNull.Value ? null : (string)dr["S_JIESHUNY"];
			QS_YH_SHENJINGXXB.S_LAOBIANH=dr["S_LAOBIANH"] == DBNull.Value ? null : (string)dr["S_LAOBIANH"];
			QS_YH_SHENJINGXXB.S_LAOBIANH2=dr["S_LAOBIANH2"] == DBNull.Value ? null : (string)dr["S_LAOBIANH2"];
			QS_YH_SHENJINGXXB.I_BLL=dr["I_BLL"] == DBNull.Value ? null : (decimal?)dr["I_BLL"];
			QS_YH_SHENJINGXXB.I_YC=dr["I_YC"] == DBNull.Value ? null : (decimal?)dr["I_YC"];
			QS_YH_SHENJINGXXB.S_XUKESLH=dr["S_XUKESLH"] == DBNull.Value ? null : (string)dr["S_XUKESLH"];
			QS_YH_SHENJINGXXB.D_XUKEQSSJ=dr["D_XUKEQSSJ"] == DBNull.Value ? null : (DateTime?)dr["D_XUKEQSSJ"];
			QS_YH_SHENJINGXXB.D_XUKEJSSJ=dr["D_XUKEJSSJ"] == DBNull.Value ? null : (DateTime?)dr["D_XUKEJSSJ"];
			return QS_YH_SHENJINGXXB;
        }
		
		
		private void AddRowNumber(DataTable dt)
		{
			dt.Columns.Add(new DataColumn("RowNumber",typeof(int)));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i][dt.Columns.Count - 1] = i + 1;
            }
		}
		#endregion
    }
}
#endregion